<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="采集监控日志 采集操作日志。日志采集的基本单位为每一个接口调用，只需在 MySQL 配置表：audit_log_pattern 中配置，即可采集该接口的操作日志，各字段的注释见表定义。例如：
insert into audit_log_pattern(uri_pattern, request_method, type, summary) values ( &#39;/v1/query/dot/inner/keyElement/windresource&#39;, &#39;GET&#39;, &#39;READ&#39;, &#39;宏观分析-点查询&#39; ); 配置完成后需刷新应用程序内的缓存，通过接口调用实现。例如：
curl -X POST &#39;http://127.0.0.1:7700/v1/audit-log/inner/pattern/refresh&#39; "><meta property="og:title" content="" />
<meta property="og:description" content="采集监控日志 采集操作日志。日志采集的基本单位为每一个接口调用，只需在 MySQL 配置表：audit_log_pattern 中配置，即可采集该接口的操作日志，各字段的注释见表定义。例如：
insert into audit_log_pattern(uri_pattern, request_method, type, summary) values ( &#39;/v1/query/dot/inner/keyElement/windresource&#39;, &#39;GET&#39;, &#39;READ&#39;, &#39;宏观分析-点查询&#39; ); 配置完成后需刷新应用程序内的缓存，通过接口调用实现。例如：
curl -X POST &#39;http://127.0.0.1:7700/v1/audit-log/inner/pattern/refresh&#39; " />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://hwangsyin.gitee.io/haizh/audit-log/capture/" />

<title>Capture | 海装三期</title>
<link rel="icon" href="/haizh/favicon.png" type="image/x-icon">


<link rel="stylesheet" href="/haizh/book.min.63eb88daa545365405ecdbb21033286a325c60a36cfa6d22d21e7c3bc9286941.css" integrity="sha256-Y&#43;uI2qVFNlQF7NuyEDMoajJcYKNs&#43;m0i0h58O8koaUE=">


<!--
Made with Book Theme
https://github.com/alex-shpak/hugo-book
-->

  
</head>

<body>
  <input type="checkbox" class="hidden" id="menu-control" />
  <main class="container flex">
    <aside class="book-menu">
      
  <nav>
<h2 class="book-brand">
  <a href="/haizh"><span>海装三期</span>
  </a>
</h2>












  <ul>
<li><a href="/haizh/economy-analysis/"><strong>风场经济性分析</strong></a>
<ul>
<li><a href="/haizh/economy-analysis/add/">新增风场经济性分析</a></li>
<li><a href="/haizh/economy-analysis/get/">获取风场经济性分析详情</a></li>
<li><a href="/haizh/economy-analysis/get-page/">获取风场经济性分析分页列表</a></li>
<li><a href="/haizh/economy-analysis/update/">修改风场经济性分析</a></li>
<li><a href="/haizh/economy-analysis/remove/">删除风场经济性分析</a></li>
<li><a href="/haizh/economy-analysis/download/">下载风场经济性分析报表</a></li>
<li><a href="/haizh/economy-analysis/upload/">上传风场经济性分析报表</a></li>
</ul>
</li>
<li><a href="/haizh/audit-log/"><strong>监控日志</strong></a>
<ul>
<li><a href="/haizh/audit-log/get-type-list/">获取操作类型列表</a></li>
<li><a href="/haizh/audit-log/get-page/">获取监控日志分页列表</a></li>
<li><a href="/haizh/audit-log/export/">导出监控日志</a></li>
<li><a href="/haizh/audit-log/capture/"class=active>采集监控日志</a></li>
</ul>
</li>
<li><a href="/haizh/tide-forecast/"><strong>潮汐预报</strong></a>
<ul>
<li><a href="/haizh/tide-forecast/get-port-list/">获取港口列表</a></li>
<li><a href="/haizh/tide-forecast/get-per-hour/">获取逐小时潮汐预报</a></li>
<li><a href="/haizh/tide-forecast/get-per-day/">获取逐日潮汐预报</a></li>
</ul>
</li>
<li><a href="/haizh/weather/"><strong>天气实况与预报</strong></a>
<ul>
<li><a href="/haizh/weather/get/">获取天气实况</a></li>
<li><a href="/haizh/weather/get-forecast/">获取天气预报</a></li>
</ul>
</li>
<li><a href="/haizh/wind-farm/"><strong>风电场</strong></a>
<ul>
<li><a href="/haizh/wind-farm/list/">获取风电场列表</a></li>
</ul>
</li>
<li><a href="/haizh/weather-history/"><strong>天气实况历史</strong></a>
<ul>
<li><a href="/haizh/weather-history/list-per-hour/">获取逐小时天气实况历史</a></li>
<li><a href="/haizh/weather-history/list-per-day/">获取逐日天气实况历史</a></li>
<li><a href="/haizh/weather-history/download-per-day/">下载逐日天气实况历史</a></li>
<li><a href="/haizh/weather-history/download-per-hour/">下载逐小时天气实况历史</a></li>
<li><a href="/haizh/weather-history/monitor-point/">获取天气观测点</a></li>
</ul>
</li>
</ul>










</nav>




  <script>(function(){var menu=document.querySelector("aside.book-menu nav");addEventListener("beforeunload",function(event){localStorage.setItem("menu.scrollTop",menu.scrollTop);});menu.scrollTop=localStorage.getItem("menu.scrollTop");})();</script>


 
    </aside>

    <div class="book-page">
      <header class="book-header">
        
  <div class="flex align-center justify-between">
  <label for="menu-control">
    <img src="/haizh/svg/menu.svg" class="book-icon" alt="Menu" />
  </label>

  <strong>Capture</strong>

  <label for="toc-control">
    <img src="/haizh/svg/toc.svg" class="book-icon" alt="Table of Contents" />
  </label>
</div>


  
 
      </header>

      
      
  <article class="markdown"><h1 id="采集监控日志">采集监控日志</h1>
<p>采集操作日志。日志采集的基本单位为每一个接口调用，只需在 MySQL 配置表：audit_log_pattern 中配置，即可采集该接口的操作日志，各字段的注释见表定义。例如：</p>
<div class="highlight"><pre style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sql" data-lang="sql"><span style="color:#719e07">insert</span> <span style="color:#719e07">into</span> audit_log_pattern(uri_pattern, request_method, <span style="color:#719e07">type</span>, summary) <span style="color:#719e07">values</span> (
  <span style="color:#2aa198">&#39;/v1/query/dot/inner/keyElement/windresource&#39;</span>, <span style="color:#2aa198">&#39;GET&#39;</span>, <span style="color:#2aa198">&#39;READ&#39;</span>, <span style="color:#2aa198">&#39;宏观分析-点查询&#39;</span>
);
</code></pre></div><p>配置完成后需刷新应用程序内的缓存，通过接口调用实现。例如：</p>
<div class="highlight"><pre style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">curl -X POST <span style="color:#2aa198">&#39;http://127.0.0.1:7700/v1/audit-log/inner/pattern/refresh&#39;</span>
</code></pre></div></article>
 
      

      <footer class="book-footer">
        
  <div class="flex justify-between">





</div>

 
        
      </footer>

      
  
  <div class="book-comments">

</div>
  
 

      <label for="menu-control" class="hidden book-menu-overlay"></label>
    </div>

    
  </main>

  
</body>

</html>












